package org.lw.springbootlw.auth.service.impl;

import org.lw.springbootlw.auth.service.AuthService;
import org.lw.springbootlw.common.mapper.auth.UserMapper;
import org.lw.springbootlw.common.model.User;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.Optional;

@Service
public class AuthServiceImpl implements AuthService {
    @Autowired
    private UserMapper userMapper;
    @Override
    public String login(String username, String password) {
        return null;
    }

    @Override
    public void logout(String token) {

    }

    @Override
    public String refreshToken(String token) {
        return null;
    }

    @Override
    public String getUserInfo(String token) {
        return null;
    }

    @Override
    public Optional<User> getUserInfoByUsername(String username) {
        return userMapper.findUserWithRolesByUsername(username);
    }
}
